package com.kw.model.weixin.user.impl;

import java.util.Date;
import java.util.HashMap;

import com.kw.model.weixin.user.WeiXinUserInfo;
import com.kw.model.weixin.user.entry.WeiXinUserOperation;

public class WeiXinUserInfoImpl implements WeiXinUserInfo  {

	private HashMap<String,WeiXinUserOperation> map=new HashMap<String,WeiXinUserOperation>();
	
	public WeiXinUserOperation getWeiXinUserOperation(String name){
		WeiXinUserOperation wxuo=map.get(name);
		if(wxuo==null){
			wxuo=new WeiXinUserOperation();
			if(getPR(name)>0){			
				wxuo.setLastCommand(0);
				wxuo.setLastOperate(new Date().getTime());
				wxuo.setUserTypeId(getPR(name));
			}else{
				wxuo.setLastCommand(0);
				wxuo.setLastOperate(new Date().getTime());
				wxuo.setUserTypeId(0);
			}
			map.put(name, wxuo);
		}
		return wxuo;
	}
	
	private int getPR(String name){
		
		
		return 1;
	}
	
}
